package com.pshcp.domain.model;

import com.pshcp.common.enums.NewsTypeEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author auto generator
 * @since 2022-11-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@Table(name = "t_news")
public class News implements Serializable {

    private static final long serialVersionUID=1L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    /**
     * 标题
     */
    private String title;

    /**
     * 封面图片地址
     */
    private String coverImage;

    /**
     * 日期
     */
    private Date date;

    /**
     * 内容
     */
    private String content;

    /**
     * 阅读量
     */
    private Integer num;

    /**
     * 创建时间
     */
    private Date createdTime;

    /**
     * 类型 0:动态 1:科普文章
     * @see NewsTypeEnum
     */
    private Integer type;

    /**
     * 更新时间
     */
    private Date updateTime;

    /**
     * 状态 0正常 1删除
     */
    private Integer status;

}
